<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增模块')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-module-add">
			<div class="form-group">
				<label class="col-sm-2 control-label">模块名称：</label>
				<div class="col-sm-8">
					<input id="moduleName" name="moduleName" class="form-control" type="text">
					<input id="datasourceId" name="datasourceId" class="form-control" type="hidden">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">表前缀：</label>
				<div class="col-sm-3">
					<input id="tablePrefix" name="tablePrefix" class="form-control" type="text">
				</div>
				<label class="col-sm-2 control-label">排序：</label>
				<div class="col-sm-3">
					<input id="moduleSort" name="moduleSort" class="form-control" type="number">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">包路径：</label>
				<div class="col-sm-8">
					<input id="packageName" name="packageName" class="form-control" type="number">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="remark" name="remark" class="form-control"></textarea>
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var datasourceId=GetQueryString("datasourceId");
		$("#datasourceId").val(datasourceId);
		var prefix = ctx + "tool/module"
		$("#form-module-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});

		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-module-add').serialize());
	        }
	    }
	</script>
</body>
</html>
